home *** CD-ROM | disk | FTP | other *** search
- /* ======================================================================
- DESC: Common Win Servcies Functions for the Administer Operations
-
- PLATFORMS: >= MS IE 4.0
-
- USAGE NOTES:
- ====================================================================== */
-
- // Populate Display View with Computers and services for Associated Alert Group
-
- // Process Read of Win Services Monitor Records by AGId
- var WSrvcsMonitorRecs = new Array();
- var WSrvcsMonitorRecLength = 5;
- var WSrvcsIndex = 0;
- function processPopulateWSTComputersContinue(coidstrg) {
- var warr1 = new Array();
- var wstat = new Array();
- wstat = coidstrg.split(":");
- if ( wstat[0] == "Err" ) {
- top.Rstatus.Pstat("Error retrieving Win Services Monitoring record: "+wstat[1],true);
- ALupMode = ""; // reset
- PINP_Bsy = false;
- return;
- }
- WSrvcsMonitorRecs.length = 0; // reset array
- WSrvcsMonitorRecs = coidstrg.split("~"); // parse out the NTservices Monitor records
- WSrvcsIndex = 0; // Monitor Records Array Index
- WSrvcsLinkIDRecs.length = 0; // Reset
- WSrvcsLinkIDRecsIndex = 0; // LinkListID Records Array Index
- prevWSCompID = "";
- processWServicesLinkIDLookup();
- }
-
- // Get Computer and Service for each NT services Link record
- var CommObj = null;
- function processWServicesLinkIDLookup() {
- var ArgStr = "";
- while ( WSrvcsIndex < WSrvcsMonitorRecs.length-1 ) {
- ArgStr += WSrvcsMonitorRecs[WSrvcsIndex+2]+"~";
- WSrvcsIndex += WSrvcsMonitorRecLength;
- }
- if ( CommObj.NTServicesLinkListLookupByID( ArgStr ) ) {
- // if unable to initiate request
- ALupMode = ""; // reset
- PINP_Bsy = false;
- top.Rstatus.Pstat("Unable to start the Win Services Computer LOOKUP request",true);
- }
- }
-
- // Process each NT services Link Record
- var WSrvcsLinkIDRecs = new Array();
- var WSrvcsLinkIDRecsIndex = 0;
- var WSrvcsLinkIDRecsLength = 3;
- var prevWSCompID = "";
- function processWServicesLinkIDLookupRecord(WSLIDrec) {
- var warr = new Array();
- var warr1 = new Array();
- var carr = new Array();
-
- warr1 = WSLIDrec.split(";");
- for ( var i=0; i<warr1.length; i++ ) {
- warr = warr1[i].split("~");
- WSrvcsLinkIDRecs[ WSrvcsLinkIDRecsIndex++ ] = warr[1]; //Services List ID
- WSrvcsLinkIDRecs[ WSrvcsLinkIDRecsIndex++ ] = warr[2]; //Computer ID
- WSrvcsLinkIDRecs[ WSrvcsLinkIDRecsIndex++ ] = warr[0]; //Services Link ID
- carr[i] = warr[2]; // Computer ID
- }
- carr.sort(); // sort the ComputerIDs
- for ( var i=0; i<carr.length; i++ ) {
- if ( carr[i] != prevWSCompID ) {
- if ( ++CountOfCompsRcvd > 1) {
- CompIdLupArr += ","; // Computer Id Array
- }
- CompIdLupArr += carr[i]; // Computer Id Array
- prevWSCompID = carr[i];
- }
- }
- processWinServicesClupDone();
- }
-